<script lang="ts" setup>
import { reactive, toRefs,ref } from 'vue'
import { onMounted } from 'vue'








let userInfo:any = reactive({
    'data':''
})

/**
 * 测试1 mock 接口
 * 
 */
/*
import axios from 'axios';
onMounted(async () => {
   await (axios.get("/api/getUserInfo").then( res => { 
        console.log(res); 
        userInfo.data =  res.data
    }));
    
})
*/

// 测2：测试 ajax
// import { getXXX } from "@/api/test";
// getXXX().then(res => {
// 	console.log(res)
// });


/**
 * 测试3 axios get
 */

 import { getTest } from "@/api/test";
 getTest().then(res => {
	console.log(res)
    userInfo.data =  res
});

/*
const loginUser: any = (params: any) => {
  return service.get("/api/getUserInfo", params);
};

console.log(loginUser)
*/


</script>
<!-- 测试页面 -->
<template>
    <div class="test-box" v-text="userInfo.data">
    </div>
</template>